<?php

require_once( '../../libs/smarty.inc' );
require_once( '../../libs/smt_variables.php' );
require_once( '../../libs/Class_DB.php' );
require_once( '../../libs/Class_ERROR.php' );
require_once( '../../libs/login.inc.php' );

if( !in_array( "H", $_SESSION['ADMIN_LOGIN']['AUTH_CD'] ) ) exit;

if( $_SERVER['REQUEST_METHOD'] == 'GET' ){
	
		
	
	$db = new Class_DB;
	$examiner = $_GET['examiner'];
	/*
	$strSql = "SELECT * FROM M_STAFF WHERE staff_id = $examiner ";
	$result = $db->query($strSql);
	$row = mysql_fetch_array($result);
	$staff_name = $row['staff_name'];
	*/
	$staff_name = $examiner;
	$img = ImageCreate(100, 100);
	
	$white = imagecolorallocate($img, 255, 255, 255);
	$black = imagecolorallocate($img, 0, 0, 0);
	
	imagearc($img, 50, 50, 80, 80, 0, 360, $black);
	$stock='C:\WINDOWS\Fonts\simkai.ttf';
	ImageTTFText($img,16,0,40,40,$black,$stock,substr($staff_name,0,1));
	ImageTTFText($img,16,0,40,70,$black,$stock,substr($staff_name,1,1));
	
	header("Content-type: image/png");
	imagepng($img);
	
	imagedestroy($img);
}

?>